<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<style>
    .out{
        width: 400px;
        height: 400px;
        background-color: pink;
    }
    .mid{
        width: 300px;
        height: 300px;
        background-color: aqua;
    }
    .in{
        width: 200px;
        height: 200px;
        background-color: blueviolet;
    }
    </style>
<body>
    <div class="out">
        
        <div class="mid">
            
            <div class="in">
                
            </div>
        </div>
    </div>
    <script>
        const out = document.querySelector('.out')
        const mid = document.querySelector('.mid')
        const in1 = document.querySelector('.in')
        out.addEventListener('click',function(e){
            console.log('外盒子')
        })
        mid.addEventListener('click',function(e){
            console.log('中盒子')
        })
        in1.addEventListener('click',function(e){
            console.log('内盒子')
        })
    </script>
</body>
</html>